package com.ibeeking.found.common.enums;

/**
 * @Author ibeeking
 * @Date: 2021-01-05 19:15
 * @Description: 公众号关注状态枚举
 */
public enum MpAttentionEnum {
    NO("未关注", 0),
    YES("已关注", 1),
    CANCEL("取消关注", 2),;
    private String desc;
    private Integer code;

    MpAttentionEnum(String desc, int code) {
        this.code = code;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getCode() {
        return code;
    }

    public static String getDescByCode(Integer code) {
        for (MpAttentionEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
